package com.huike.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huike.dto.ContractDto;
import com.huike.pojo.Contract;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ContractMapper extends BaseMapper<Contract> {

    /*查询合同分页的接口
     * */
    List<Contract> selectContractList(ContractDto contractDto);

    Contract selectAllByid(Long id);

    Contract getContract(Long id);
    /**
     * 合同统计
     * @param beginCreateTime
     * @param endCreateTime
     * @return
     */
    public List<Map<String,Object>> contractStatistics(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);

    /**
     * 统计商机转化的合同数
     * @param beginCreateTime
     * @param endCreateTime
     * @return
     */
    public int contractNumsFromBusiness(@Param("beginCreateTime") String beginCreateTime, @Param("endCreateTime") String endCreateTime);
}
